package fh.app4stud.mensa.data;

import java.util.Comparator;

/**
 * Created by IntelliJ IDEA. User: ifi Date: 22.04.11 Time: 01:19 To change this
 * template use File | Settings | File Templates.
 */
public class LocationsSort {

	public static final Comparator<RestaurantLocation> CITY_ORDER = new Comparator<RestaurantLocation>() {
		public int compare(RestaurantLocation e1, RestaurantLocation e2) {
			return e2.getCity().compareTo(e1.getCity());
		}
	};

	public static final Comparator<RestaurantLocation> DISTANCE_ORDER = new Comparator<RestaurantLocation>() {
		public int compare(RestaurantLocation e1, RestaurantLocation e2) {
			return e2.getDistanceFromCurrentLocation().compareTo(
					e1.getDistanceFromCurrentLocation());
		}
	};

}
